﻿using System;

namespace ebay.Model
{
    public enum FeedbackStatusType
    {
        None = 0,
        SendCancelRequest = 1,
        RejectRequest = 2,
        AcceptRequest = 3
    }

    /// <summary>
    /// eBay feedback primary key
    /// </summary>
    [Serializable]
    public class eBayFeedbackPrimaryKey
    {
        public virtual String eBayUserID { get; set; }

        public virtual String FeedbackID { get; set; }

        public override bool Equals(object obj) {
            return base.Equals(obj);
        }

        public override int GetHashCode() {
            return base.GetHashCode();
        }
    }

    /// <summary>
    /// eBay feedback model
    [Serializable]
    public class eBayFeedback : ebay.Infrastructure.DomainBase.EntityBase
    {
        public virtual eBayFeedbackPrimaryKey PrimaryKey { get; set; }

        public virtual String CommentingUser { get; set; }

        public virtual int CommentingUserScore { get; set; }

        public virtual String CommentText { get; set; }

        public virtual DateTime CommentTime { get; set; }

        public virtual string CommentType { get; set; }

        public virtual string ItemID { get; set; }

        public virtual string Role { get; set; }

        public virtual string TransactionID { get; set; }

        public virtual string OrderLineItemID { get; set; }

        public virtual string ItemTitle { get; set; }

        public virtual double ItemPrice { get; set; }

        public virtual string CurrencyId { get; set; }

        public virtual DateTime ImportDate { get; set; }

        public virtual Nullable<DateTime> LastReplyDate { get; set; }

        public virtual Nullable<Boolean> HasResponse { get; set; }

        public virtual FeedbackStatusType FeedbackStatus { get; set; }

        public virtual Nullable<int> TreeID { get; set; }

        public virtual String TrackLevel { get; set; }

        public virtual List<Order> Orders { get; set; }
    }

    public class eBayFeedbackView
    {
        public eBayFeedbackView(String ebayUserID, String feedbackID, String buyerID, String commentText, DateTime commentTime,
            String commentType, String itemID, String trackLvl, String orderID, String orderSalesRecordNumber) {
            this.eBayUserID = ebayUserID;
            this.FeedbackID = feedbackID;
            this.BuyerID = buyerID;
            this.CommentText = commentText;
            this.CommentTime = commentTime;
            this.CommentType = commentType;
            this.ItemID = itemID;
            this.TrackLevel = trackLvl;
            this.OrderID = orderID;
            this.OrderSalesRecordNumber = orderSalesRecordNumber;
        }

        public virtual String eBayUserID { get; set; }

        public virtual String FeedbackID { get; set; } 

        public virtual String BuyerID { get; set; }

        public virtual String CommentText { get; set; }

        public virtual DateTime CommentTime { get; set; }

        public virtual string CommentType { get; set; }

        public virtual string ItemID { get; set; }
        
        public virtual String TrackLevel { get; set; }

        public virtual String OrderID { get;set; }

        public virtual String OrderSalesRecordNumber { get; set; }
    }
}
